#!/bin/sh
#
# Check that all CGI-BIN scripts and all Tools scripts at least
# can be compiled without syntax errors
#

# sub to check a file
checkfile() {
    local type
    type=`file -b $1`
    if [ "$type" = "perl script text executable" ]; then
       perl -c $1
    fi
}

for script in ../cgi-bin/*.cgi ../cgi-bin/*.pl; do
    checkfile $script
done
for script in ../cgi-adm/*.cgi; do
    checkfile $script
done
for script in ../tools/*[a-z]; do
    checkfile $script
done

